import request from "@/utils/request";

//  公告签收接口(signIn)
export function signIn(id) {
  return request({
    url: `/v1/ggxx-signin/${id}`,
    method: "post",
  });
}

//  公告保存草稿
export function saveDraft(data) {
  return request({
    url: `/v1/ggxx`,
    method: "put",
    data
  });
}

//  公告发布
export function onPublish(data) {
  return request({
    url: `/v1/ggxx/save-publish`,
    method: "put",
    data
  });
}

// 公告删除
export function deleteNotice(id) {
  return request({
    url: `/v1/ggxx/${id}`,
    method: "Delete"
  });
}
// 公告详情
export function noticeDetail(id) {
  return request({
    url: `/v1/ggxx/${id}`,
    method: "get"
  });
}
// 公告修改
export function updateNotice(data) {
  return request({
    url: `/v1/ggxx`,
    method: "post",
    data
  });
}
